package com.kang.controller;

import com.kang.bean.FriendGroup;
import com.kang.commons.Result;
import com.kang.service.FriendGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @program: photo_fawu
 * @description:
 * @author: K.faWu
 * @create: 2021-11-12 16:22
 **/
@RestController
@RequestMapping("/friendGroup")
public class FriendGroupController {

    @Autowired
    private FriendGroupService friendGroupService;

    @PostMapping
    public Result<?> addGroup(@RequestBody FriendGroup friendGroup, HttpServletRequest request){
        friendGroupService.addFriendGroup(friendGroup,request);
        return Result.success();
    }

}
